import request from '@/utils/request'

export default {

  findChapterByCourseId(courseId) {

    return request({
      url: `/chapter/video/${courseId}`,
      method: "get"
    })

  },

  //添加章节
  addChapter(data) {

    return request({
      url: `/chapter`,
      method: "post",
      data
    })
  },

  //删除章节
  deleteChapterById(id) {

    return request({
      url: `/chapter/${id}`,
      method: "delete"
    })

  },
  // 通过id查询 chapter
  findChapterById(id) {

    return request({
      url: `/chapter/${id}`,
      method: "get"
    })

  }
}
